<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Index extends Controller {

	function __construct()
	{
            parent::__construct();
            //$this->template->load('template', 'home');
            
        }

	function index()
	{            
            //$data["destination_arr"] = $this->hotel_model->get_destinations();
            $this->load->model('commonmodel');
            $data['events']=$this->commonmodel->get_featuredevent();
            $data['videos']=$this->commonmodel->get_featuredvideos();
            $data['gallery']=$this->commonmodel->get_galleryimages();            
            //print_r($data['events']);exit;
            $this->template->load('template', 'home', $data);
            //$this->load->view('home');
        }

        function lang()
        {
            $lang=$this->uri->segment(3);
            $return_url = $_SERVER['HTTP_REFERER'];
            try
            {
                $lang_sess_data = array('sess_lang' => $lang);
                //$this->session->set_langdata($lang_sess_data);
                $this->session->set_userdata('language', $lang);
            } catch (Exception $e) {
                throw new Exception('Error session assign');
            }

            

            redirect($return_url);
            $this->template->load('template', 'home');
        }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */